package junior.util.function;

import junior.util.exception.ExceptionUtils;

@FunctionalInterface
public interface CheckedRunnable extends Runnable {
    
    @Override
    default void run() {
        try {
            runThrows();
        } catch (final Exception e) {
            throw ExceptionUtils.wrap2Runtime(e);
        }
    }
    
    void runThrows() throws Exception;
}
